package com.itheima.accountingdb;


import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

@Slf4j
@SpringBootApplication
public class AccountingDbApplication implements CommandLineRunner {

	public static void main(String[] args) {
		SpringApplication.run(AccountingDbApplication.class, args);
		System.out.println("启动成功");
	}

	@Override
	public void run(String... args) throws Exception {
		//端口号默认8080
		log.info("Tomcat在端口 " + 8080 + " (http)上启动：\n");

		String hostname = "localhost";
		String http = "http://";

		log.info("Api文档 浏览器访问地址如下：");
		log.info(http + hostname + ":" + 8080 + "/swagger-ui/index.html\n");

		log.info("ApiFox的 URL方式 导入路径为：");
		log.info(http + hostname + ":" + 8080 + "/v3/api-docs\n");
	}
}
